package com.ynet.middleground.riskmanage.bean;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

import com.ynet.core.common.BaseReqObjPager;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @ClassName PurchaseOrderDataReq
 * @Description 采购中心--获取订单数据请求类
 * @Author zhangyongbin
 * @Date 2020/8/13 10:48
 * @Version 1.0
 * @ModifyBy liulx
 * @ModifyDate 2020-09-11 11:17:17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "获取订单、对账单、发票数据请求信息", description = "获取订单、对账单、发票数据请求信息")
public class PurchaseReq extends BaseReqObjPager {

    private static final long serialVersionUID = 1670927275556759944L;

    @ApiModelProperty(value = "用户id", notes = "用户id")
    private String userId;

    @ApiModelProperty(value = "供应商名称", notes = "供应商名称", required = true)
    @NotEmpty(message = "供应商名称不能为空")
    private String userName;

    @ApiModelProperty(value = "起止日期", notes = "起止日期", example = "2020060120200630", required = true)
    @Size(min = 16, max = 16, message = "起始日期长度必须为16位")
    @NotEmpty(message = "起始日期不能为空")
    private String startorenddate;

    @ApiModelProperty(value = "计划编号（仅查询发票数据时可用）", notes = "计划编号（仅查询发票数据时可用）")
    private String planNum;

    @ApiModelProperty(
        value = "排序字段-获取对账单：accountRange(对账年月),settlementDate(结算年月),deliveryNum(收货单号),accountTime(对账日期),receivedTotal(账单金额),receiptDate(收货日期)；"
            + "排序字段-获取订单：planPeriod(计划期间),planNum(计划编号), applicationDate(申请日期), createTime(创建时间), billTotal(订单金额);"
            + "排序字段-获取发票：billtime(开票日期), billmoney(票面金额);" + "若此字段上传，则“排序方式”也必传",
        notes = "排序字段-获取对账单：accountRange(对账年月),settlementDate(结算年月),deliveryNum(收货单号),accountTime(对账日期),receivedTotal(账单金额),receiptDate(收货日期)；"
            + " 排序字段-获取订单：planPeriod(计划期间),planNum(计划编号), applicationDate(申请日期), createTime(创建时间), billTotal(订单金额);"
            + " 排序字段-获取订单：billtime(开票日期), billmoney(票面金额);" + "若此字段上传，则“排序方式”也必传")
    private String sortField;

    @ApiModelProperty(value = "排序方式：asc(升序)，desc(降序);若此字段上传，则“排序字段”也必传", notes = "排序方式：asc(升序)，desc(降序)")
    private String sortOrder;

}
